﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BGM_ProjectOptionSummary.aspx.cs" Inherits="KPIS.GERP.GBMS.APP_UI.Form.BGM_ProjectOptionSummary" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Charting" tagprefix="telerik" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

</head>
<body>
    <form id="form1" runat="server" style="background-color:yellowgreen; padding:0; margin:0;font-family: Tahoma; font-size: small;">
        <link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css" />
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <div>
        <div style="background-color:white">
        <table>
            <tr>
                <td style="font-size:large; color:#0094ff">
                    เลือกประเภทของแผนภูมิ
                </td>
                <td>
                    <asp:RadioButtonList ID="rblChartType" runat="server" AutoPostBack="true" RepeatDirection="Horizontal"
                        OnSelectedIndexChanged="rblChartType_SelectedIndexChanged">
                        <asp:ListItem Text="แผนภูมิวงกลม" Value="Pie" Selected="True"></asp:ListItem>
                        <asp:ListItem Text="แผนภูมิแท่ง" Value="Bar" ></asp:ListItem>
                        
                    </asp:RadioButtonList>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td>
                    หน่วยงาน :
                </td>
                <td>
                    <telerik:RadComboBox ID="ddlJobSite" runat="server" Visible="true"
                        OnSelectedIndexChanged="ddlJobSite_SelectedIndexChanged"
                        AllowCustomText="false" CausesValidation="false" DataTextField="text" AutoPostBack="true"
                        DataValueField="value"
                        Filter="Contains" Width="530px"><%--OnClientTextChange="onTextChange"--%>
                    </telerik:RadComboBox>
                </td>
            </tr>
        </table>
        </div>
        <telerik:RadHtmlChart ID="BarChart" runat="server" Width="950px" Height="548px">
            <PlotArea>
                <Series>
                    <telerik:BarSeries DataFieldY="total_amount">
                        <LabelsAppearance DataFormatString="#,##0"></LabelsAppearance>
                        <Appearance FillStyle-BackgroundColor="Red" />
                    </telerik:BarSeries>
                    <%--<telerik:ColumnSeries DataFieldY="total_amount">
                        <LabelsAppearance DataFormatString="#,##0"></LabelsAppearance>
                    </telerik:ColumnSeries>--%>
                </Series>
                <XAxis DataLabelsField="bgm_option_name">
                    <TitleAppearance Text="">
                        
                    </TitleAppearance>
                    <MajorGridLines Visible="false" />
                    <MinorGridLines Visible="false" />
                </XAxis>
                <YAxis MajorTickSize="4" MinorTickSize="1">
                    <TitleAppearance Text="จำนวนเงินงบประมาณ (บาท)">
                        
                    </TitleAppearance>
                    <LabelsAppearance DataFormatString="#,##0" />
                    <MinorGridLines Visible="false" Width="1px"  />

                </YAxis>
                <Appearance FillStyle-BackgroundColor="YellowGreen"></Appearance>
            </PlotArea>
            <ChartTitle Text="กราฟแสดง">
            </ChartTitle>
        </telerik:RadHtmlChart>
        <telerik:RadHtmlChart ID="PieChart" runat="server" Width="950px" Height="548px"
            Skin="Sunset" Transitions="true">
            <PlotArea>
                <Series>
                    <telerik:PieSeries StartAngle="90" DataFieldY="total_amount"
                        NameField="bgm_option_name">
                        <LabelsAppearance Position="Circle" DataFormatString="{0:N}"
                            ClientTemplate="#=dataItem.bgm_option_name# : #=kendo.format(\'{0:N}\', dataItem.total_amount)# บาท">
                        </LabelsAppearance>
                        <TooltipsAppearance ClientTemplate="#=dataItem.percent# %"></TooltipsAppearance>
                    </telerik:PieSeries>
                </Series>
                <Appearance FillStyle-BackgroundColor="YellowGreen"></Appearance>
            </PlotArea>
            <Legend>
                <Appearance BackgroundColor="YellowGreen" Position="Right" Visible="false"></Appearance>
            </Legend>
            <ChartTitle Text="กราฟแสดง">
            </ChartTitle>
        </telerik:RadHtmlChart>
    </div>
    </form>
</body>
</html>
